<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row" >
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<div class="form-group">
                                <label class="col-sm-2 control-label" >业务元名称：</label>
                                <div class="col-sm-4">
                                    <input id="busiName" name="busiName" class="input-text form-control" required="required">
                                </div>
                                <label class="col-sm-2 control-label" >数据类型：</label>
                                <div class="col-sm-4">
                                	<select data-placeholder="--请选择数据类型--" name="dataType" id="dataType"
	                                        class="form-control chosen-select" tabindex="2" required>
	                                    <option value="">--请选择数据类型--</option>
	                                    <option value="0">企业</option>
	                                    <option value="1">自然人</option>
	                        		</select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >业务类型：</label>
                                <div class="col-sm-2">
                                    <select data-placeholder="--请选择业务大类--" name="busiType" id="busiType"
	                                        class="form-control chosen-select" tabindex="2" required>
	                                    <option value="">--请选择业务大类--</option>
	                        		</select>
                                </div>
                                <div class="col-sm-2">
                                    <select data-placeholder="--请选择业务小类--" name="busiTypeNode" id="busiTypeNode"
                                       class="form-control chosen-select" tabindex="2" required>
                                       <option value="">--请选择业务小类--</option> 
                           			</select>
                                </div>
                                <label class="col-sm-2 control-label" >开放等级：</label>
                                <div class="col-sm-4">
                                    <select data-placeholder="--请选择开放等级--" name="openLevel" id="openLevel"
                                       class="form-control chosen-select" tabindex="2" required>
                                       <option value="">--请选择开放等级--</option> 
                           			</select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >算法类型：</label>
                                <div class="col-sm-4">
                                    <select data-placeholder="单项" name="algorithmType" id="algorithmType"
                                       class="form-control chosen-select" tabindex="2" required>
                                       <option value="1">单项</option>
                                       <option value="2">单表统计</option>
                                       <option value="3">自定义</option> 
                                       <option value="4">接口访问</option> 
                                       <option value="5">拆分统计</option>
                           			</select>
                                </div>
                                <label class="col-sm-2 control-label" >链接方式：</label>
                                <div class="col-sm-4">
                                    <select data-placeholder="--请选择--" name="linkWay" id="linkWay"
                                       class="form-control chosen-select" tabindex="2" required>
                                       <option value="">--请选择--</option>
                                       <option value="3">无</option>
                                       <option value="0">明细</option>
                                       <option value="1">企业信用记录</option>
                                       <option value="2">自然人信用记录</option>
                                       <option value="4">企查查接口</option>
                           			</select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label" >用途：</label>
                                <div class="col-sm-10" id="dataUseDiv">
                                    <!-- <label><input type="checkbox" id="dataUse" name="dataUse" class="input-text form-control">1</label>
                                	<label><input type="checkbox" id="dataUse" name="dataUse" class="input-text form-control">2</label>
                                	<label><input type="checkbox" id="dataUse" name="dataUse" class="input-text form-control">3</label> -->
                                </div>
                            </div>
                            <!-- 算法为单表统计时的div -->
                            <div id="simpleTable" style="display: none;">
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >数据目录：</label>
	                                <div class="col-sm-4">
	                                    <select data-placeholder="--请选择表--" name="stTableId" id="stTableId"
	                                       class="form-control chosen-select" tabindex="2" required>
	                                       <option value="">--请选择表--</option>
	                           			</select>
	                                </div>
	                                <div id="detailDiv1" style="display: none;">
		                                <label class="col-sm-2 control-label" >明细字段：</label>
		                                <div class="col-sm-4">
		                                <input id="stDetFieldId" name="stDetFieldId" class="input-text form-control" type="hidden">
		                                <input id="stDetFieldName" name="stDetFieldName" class="input-text form-control" required="required" readonly="readonly" onclick="toDetField();" style="background-color: white;">
		                                </div>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >说明：</label>
	                                <div class="col-sm-10">
	                                	<textarea id="stBusiDesc" name="stBusiDesc" rows="8" class="form-control"></textarea>
	                                </div>
	                            </div>
                            </div>
                            <!-- 算法为单项时的div -->
                            <div id="simple" style="">
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >数据目录：</label>
	                                <div class="col-sm-4">
	                                    <select data-placeholder="--请选择表--" name="tableId" id="tableId"
	                                       class="form-control chosen-select" tabindex="2" required>
	                                       <option value="">--请选择表--</option>
	                           			</select>
	                                </div>
	                                <label class="col-sm-2 control-label" >数据项：</label>
	                                <div class="col-sm-4">
	                                    <select data-placeholder="--请选择字段--" name="fieldId" id="fieldId"
	                                       class="form-control chosen-select" tabindex="2" required>
	                                       <option value="">--请选择字段--</option>
	                           			</select>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >说明：</label>
	                                <div class="col-sm-10">
	                                	<textarea id="busiDesc" name="busiDesc" rows="8" class="form-control"></textarea>
	                                </div>
	                            </div>
                            </div>
                            <!-- 算法为接口访问 -->
                            <div id="interface" style="display: none;">
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >SringBean：</label>
	                                <div class="col-sm-4">
	                                    <input id="springBean" name="springBean" class="input-text form-control" required>
	                                </div>
	                                <label class="col-sm-2 control-label" >接口名称：</label>
	                                <div class="col-sm-4">
	                                    <input id="interfaceName" name="interfaceName" class="input-text form-control" required>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >说明：</label>
	                                <div class="col-sm-10">
	                                	<textarea id="iBusiDesc" name="iBusiDesc" rows="8" class="form-control"></textarea>
	                                </div>
	                            </div>
                            </div>
                            <!-- 算法为自定义时的div -->
                            <div id="customize" style="display: none;">
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >数据源：</label>
	                                <div class="col-sm-4">
	                                    <select data-placeholder="--请选择--" name="dataSource" id="dataSource"
	                                       class="form-control chosen-select" tabindex="2" required>
	                                       <option value="">--请选择--</option>
	                                       <!-- <option value="ORACLE">ORACLE</option>
	                                       <option value="MySql">MySql</option> -->
	                           			</select>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >自定义sql：</label>
	                                <div class="col-sm-10">
	                                	<textarea id="busiSql" name="busiSql" rows="5" class="form-control" required></textarea>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >说明：</label>
	                                <div class="col-sm-10">
	                                	<textarea id="cBusiDesc" name="cBusiDesc" rows="8" class="form-control"></textarea>
	                                </div>
	                            </div>
	                            <div  id="detailDiv" style="display: none;">
		                            <div class="form-group">
		                                <label class="col-sm-2 control-label" >明细sql：</label>
		                                <div class="col-sm-10">
		                                	<textarea id="busiSqldet" name="busiSqldet" rows="5" class="form-control" required></textarea>
		                                </div>
		                            </div>
		                            <div class="form-group">
		                                <label class="col-sm-2 control-label" >明细说明：</label>
		                                <div class="col-sm-10">
		                                	<textarea id="busiDescdet" name="busiDescdet" rows="8" class="form-control"></textarea>
		                                </div>
		                            </div>
	                            </div>
                            </div>
                            <!-- 算法为拆分统计时 -->
                            <div id="splitStatistics" style="display: none;">
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >数据目录：</label>
	                                <div class="col-sm-4">
	                                    <select data-placeholder="--请选择表--" name="sTableId" id="sTableId"
	                                       class="form-control chosen-select" tabindex="2" required>
	                                       <option value="">--请选择表--</option>
	                           			</select>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >数据项：</label>
	                                <div class="col-sm-4">
	                                    <select data-placeholder="--请选择字段--" name="sFieldId" id="sFieldId"
	                                       class="form-control chosen-select" tabindex="2" required>
	                                       <option value="">--请选择字段--</option>
	                           			</select>
	                                </div>
	                                <label class="col-sm-2 control-label" >字段值：</label>
	                                <div class="col-sm-4">
	                                    <input id="fieldValue" name="fieldValue" class="input-text form-control" required="required">
	                                </div>
	                            </div>
	                            <div class="form-group">
	                            	<div id="detailDiv2" style="display: none;">
		                                <label class="col-sm-2 control-label" >明细字段：</label>
		                                <div class="col-sm-4">
		                                <input id="sDetFieldId" name="sDetFieldId" class="input-text form-control" type="hidden">
		                                <input id="sDetFieldName" name="sDetFieldName" class="input-text form-control" required="required" readonly="readonly" onclick="toDetField();" style="background-color: white;">
		                                </div>
	                                </div>
	                            </div>
	                            <div class="form-group">
	                                <label class="col-sm-2 control-label" >说明：</label>
	                                <div class="col-sm-10">
	                                	<textarea id="sBusiDesc" name="sBusiDesc" rows="8" class="form-control"></textarea>
	                                </div>
	                            </div>
                            </div>
                            <div class="form-group">
								<div class="col-sm-8 col-sm-offset-6">
									<button type="submit" class="btn btn-primary" >提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="include::footer"></div>
	<script th:inline="javascript"> var ctx = [[@{/}]] ; </script>
	<script type="text/javascript" src="/js/app/metadata/business/add.js"
		th:src="@{/js/app/metadata/business/add.js}"></script>
</body>
</html>